3.812 \(\int \frac{(f+g x)^n \left (a+2 c d x+c e x^2\right )}{(d+e x)^4} \, dx\)

Optimal. Leaf size=197 \[ \frac{g (f+g x)^{n+1} \left (a e g^2 \left (n^2-3 n+2\right )+c \left (d^2 g^2 \left (-n^2+3 n+4\right )-12 d e f g+6 e^2 f^2\right )\right ) \, _2F_1\left (2,n+1;n+2;\frac{e (f+g x)}{e f-d g}\right )}{6 e (n+1) (e f-d g)^4}-\frac{g (2-n) \left (c d^2-a e\right ) (f+g x)^{n+1}}{6 e (d+e x)^2 (e f-d g)^2}-\frac{\left (a-\frac{c d^2}{e}\right ) (f+g x)^{n+1}}{3 (d+e x)^3 (e f-d g)} \]

[Out]

-((a - (c*d^2)/e)*(f + g*x)^(1 + n))/(3*(e*f - d*g)*(d + e*x)^3) - ((c*d^2 - a*e
)*g*(2 - n)*(f + g*x)^(1 + n))/(6*e*(e*f - d*g)^2*(d + e*x)^2) + (g*(a*e*g^2*(2
- 3*n + n^2) + c*(6*e^2*f^2 - 12*d*e*f*g + d^2*g^2*(4 + 3*n - n^2)))*(f + g*x)^(
1 + n)*Hypergeometric2F1[2, 1 + n, 2 + n, (e*(f + g*x))/(e*f - d*g)])/(6*e*(e*f
- d*g)^4*(1 + n))

_______________________________________________________________________________________

Rubi [A]  time = 0.513851, antiderivative size = 197, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.107 \[ \frac{g (f+g x)^{n+1} \left (a e g^2 \left (n^2-3 n+2\right )+c \left (d^2 g^2 \left (-n^2+3 n+4\right )-12 d e f g+6 e^2 f^2\right )\right ) \, _2F_1\left (2,n+1;n+2;\frac{e (f+g x)}{e f-d g}\right )}{6 e (n+1) (e f-d g)^4}-\frac{g (2-n) \left (c d^2-a e\right ) (f+g x)^{n+1}}{6 e (d+e x)^2 (e f-d g)^2}-\frac{\left (a-\frac{c d^2}{e}\right ) (f+g x)^{n+1}}{3 (d+e x)^3 (e f-d g)} \]

Antiderivative was successfully verified.

[In]  Int[((f + g*x)^n*(a + 2*c*d*x + c*e*x^2))/(d + e*x)^4,x]

[Out]

-((a - (c*d^2)/e)*(f + g*x)^(1 + n))/(3*(e*f - d*g)*(d + e*x)^3) - ((c*d^2 - a*e
)*g*(2 - n)*(f + g*x)^(1 + n))/(6*e*(e*f - d*g)^2*(d + e*x)^2) + (g*(a*e*g^2*(2
- 3*n + n^2) + c*(6*e^2*f^2 - 12*d*e*f*g + d^2*g^2*(4 + 3*n - n^2)))*(f + g*x)^(
1 + n)*Hypergeometric2F1[2, 1 + n, 2 + n, (e*(f + g*x))/(e*f - d*g)])/(6*e*(e*f
- d*g)^4*(1 + n))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 38.8343, size = 99, normalized size = 0.5 \[ \frac{c g \left (f + g x\right )^{n + 1}{{}_{2}F_{1}\left (\begin{matrix} 2, n + 1 \\ n + 2 \end{matrix}\middle |{\frac{e \left (- f - g x\right )}{d g - e f}} \right )}}{e \left (n + 1\right ) \left (d g - e f\right )^{2}} + \frac{g^{3} \left (f + g x\right )^{n + 1} \left (a e - c d^{2}\right ){{}_{2}F_{1}\left (\begin{matrix} 4, n + 1 \\ n + 2 \end{matrix}\middle |{\frac{e \left (- f - g x\right )}{d g - e f}} \right )}}{e \left (n + 1\right ) \left (d g - e f\right )^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((g*x+f)**n*(c*e*x**2+2*c*d*x+a)/(e*x+d)**4,x)

[Out]

c*g*(f + g*x)**(n + 1)*hyper((2, n + 1), (n + 2,), e*(-f - g*x)/(d*g - e*f))/(e*
(n + 1)*(d*g - e*f)**2) + g**3*(f + g*x)**(n + 1)*(a*e - c*d**2)*hyper((4, n + 1
), (n + 2,), e*(-f - g*x)/(d*g - e*f))/(e*(n + 1)*(d*g - e*f)**4)

_______________________________________________________________________________________

Mathematica [A]  time = 0.283431, size = 0, normalized size = 0. \[ \int \frac{(f+g x)^n \left (a+2 c d x+c e x^2\right )}{(d+e x)^4} \, dx \]

Verification is Not applicable to the result.

[In]  Integrate[((f + g*x)^n*(a + 2*c*d*x + c*e*x^2))/(d + e*x)^4,x]

[Out]

Integrate[((f + g*x)^n*(a + 2*c*d*x + c*e*x^2))/(d + e*x)^4, x]

_______________________________________________________________________________________

Maple [F]  time = 0.161, size = 0, normalized size = 0. \[ \int{\frac{ \left ( gx+f \right ) ^{n} \left ( ce{x}^{2}+2\,cdx+a \right ) }{ \left ( ex+d \right ) ^{4}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((g*x+f)^n*(c*e*x^2+2*c*d*x+a)/(e*x+d)^4,x)

[Out]

int((g*x+f)^n*(c*e*x^2+2*c*d*x+a)/(e*x+d)^4,x)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (c e x^{2} + 2 \, c d x + a\right )}{\left (g x + f\right )}^{n}}{{\left (e x + d\right )}^{4}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*e*x^2 + 2*c*d*x + a)*(g*x + f)^n/(e*x + d)^4,x, algorithm="maxima")

[Out]

integrate((c*e*x^2 + 2*c*d*x + a)*(g*x + f)^n/(e*x + d)^4, x)

_______________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \[{\rm integral}\left (\frac{{\left (c e x^{2} + 2 \, c d x + a\right )}{\left (g x + f\right )}^{n}}{e^{4} x^{4} + 4 \, d e^{3} x^{3} + 6 \, d^{2} e^{2} x^{2} + 4 \, d^{3} e x + d^{4}}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*e*x^2 + 2*c*d*x + a)*(g*x + f)^n/(e*x + d)^4,x, algorithm="fricas")

[Out]

integral((c*e*x^2 + 2*c*d*x + a)*(g*x + f)^n/(e^4*x^4 + 4*d*e^3*x^3 + 6*d^2*e^2*
x^2 + 4*d^3*e*x + d^4), x)

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{\left (f + g x\right )^{n} \left (a + 2 c d x + c e x^{2}\right )}{\left (d + e x\right )^{4}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((g*x+f)**n*(c*e*x**2+2*c*d*x+a)/(e*x+d)**4,x)

[Out]

Integral((f + g*x)**n*(a + 2*c*d*x + c*e*x**2)/(d + e*x)**4, x)

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (c e x^{2} + 2 \, c d x + a\right )}{\left (g x + f\right )}^{n}}{{\left (e x + d\right )}^{4}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*e*x^2 + 2*c*d*x + a)*(g*x + f)^n/(e*x + d)^4,x, algorithm="giac")

[Out]

integrate((c*e*x^2 + 2*c*d*x + a)*(g*x + f)^n/(e*x + d)^4, x)